import request2 from '@/utils/request2'
import { unionApiUrl } from '../../config'

/**
 * 设计管理工作月报列表
 * @param params
 * @param data
 */
export function getPageMonthDesignList(params, data) {
  return request2({
    url: unionApiUrl + '/monthDesignReport/getPageMonthDesign',
    method: 'post',
    params,
    data
  })
}

/**
* 设计管理工作月报统计
* @param params
* @param data
*/
export function getPageMonthDesignTotal(params, data) {
  return request2({
    url: unionApiUrl + '/monthDesignReport/getPageMonthDesignTotal',
    method: 'post',
    params,
    data
  })
}

/**
* 设计管理工作月报导出
* @param params
* @param data
*/
export function exportWord(data) {
  return request2({
    url:`${unionApiUrl}/monthDesignReport/exportWord/${data.id}`,
    method: 'get',
    responseType: 'arraybuffer',
  })
}
/**
* 获取设计管理工作月报信息
* @param params
* @param data
*/
export function getMonthDesignById(params) {
  return request2({
    url: unionApiUrl + '/monthDesignReport/getMonthDesignById',
    method: 'get',
    params
  })
}
/**
* 修改设计管理工作月报
* @param params
* @param data
*/
export function updateByPrimaryKeySelective(data) {
  return request2({
    url: unionApiUrl + '/monthDesignReport/updateByPrimaryKeySelective',
    method: 'post',
    data
  })
}
/**
* 项目设计优化及通过情况
* @param params
* @param data
*/
export function queryDesignList(data) {
  return request2({
    url: `${unionApiUrl}/monthDesignReport/queryDesignList/${data.id}`,
    method: 'get',
    data
  })
}
/**
* 公司双优化累计完成情况
* @param params
* @param data
*/
export function queryOptimizeList(data) {
  return request2({
    url: `${unionApiUrl}/monthDesignReport/queryOptimizeList/${data.id}`,
    method: 'get',
    data
  })
}

/**
* 总累计通过审批立项数
* @param params
* @param data
*/
export function queryAllPastList(data) {
  return request2({
    url: `${unionApiUrl}/monthDesignReport/queryAllPastList/${data.id}`,
    method: 'get',
    data
  })
}

/**
* 设计策划情况
* @param params
* @param data
*/
export function queryMonthDesignPlanListByBaseId(data) {
  return request2({
    url: `${unionApiUrl}/monthDesignReport/queryMonthDesignPlanListByBaseId/${data.id}`,
    method: 'get',
    data
  })
}